@import (reference) "~weaver-mobile/dist/weaver-mobile.less";

@emailAttachment: email-attachment;
@filePreview: file-preview;

.@{emailAttachment} {
  height: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  background: @fill-body;
  &-list-view {
    height: 100%;
    padding-bottom: @search-bar-height;
    box-sizing: border-box;
  }
  &-list {
    .wm-list-view-page-modal-scrollview-content {
      padding-bottom: @search-bar-height;
    }
    &-template {
      .@{emailAttachment}-info {
        color: @color-text-caption;
        > span {
          margin-right: @h-spacing-md;
        }
      }
    }
  }
  &-all {
    display: flex;
    border-bottom: @border-width-md solid @border-color-base;
    &-choise {
      flex: 1 1;
    }
    &-cancel {
      color: @brand-primary;
      margin-right: @v-spacing-md;
    }
    &-select {
      flex-basis: auto;
      padding-right: @v-spacing-md;
    }
  }
  &-write,
  &-download,
  &-check-email {
    color: @color-text-base-inverse;
    // padding-left: @v-spacing-sm;
    // padding-right: @v-spacing-sm;
  }
  &-write {
    background: @brand-primary;
  }
  &-download {
    background: @brand-success;
  }
  &-check-email {
    background: @color-icon-base;
  }
  &-search-advanced-unempty {
    color: @brand-primary !important;
  }
  &-btn-group {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: @fill-base;
  }
  .email-nav-bar,
  .email-action-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
  }
}

.@{filePreview} {
  text-align: center;
  // padding-top: 100 * @hd;
  // box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  > img {
    max-height: 100%;
    max-width: 100%;
  }
  &-message {
    padding-top: 100 * @hd;
  }
  &-filetype {
    width: 75 * @hd;
    height: 75 * @hd;
    border-radius: 5 * @hd;
    &.icon-word {
      color: @icon-word;
    }
    &.icon-rar {
      color: @icon-rar;
    }
    &.icon-pic {
      color: @icon-pic;
    }
    &.icon-pdf {
      color: @icon-pdf;
    }
    &.icon-html {
      color: @icon-html;
    }
    &.icon-excel {
      color: @icon-excel;
    }
    &.icon-combined-shape {
      color: @icon-combined-shape;
    }
  }
  &-filename {
    color: @color-text-paragraph;
    margin: @h-spacing-md @v-spacing-md;
  }
  &-open {
    width: 80%;
    margin: 30 * @hd auto;
    border-radius: 4 * @hd;
  }
  &-loading {
    text-align: center;
    padding-top: 100 * @hd;
    width: 30%;
    margin: auto;
  }
  .email-action-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
  }
  &-frame {
    .wea-doc-openattach {
      height: 100%;
      width: 100%;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      iframe {
        width: 100%;
        height: 100%;
        border: none;
      }
    }
  }
}
